/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seaworldsoft.publish.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 *
 * @author sam
 */
@Entity
@Table(name="sys_accessory")
public class Accessory {

        @Id
	@TableGenerator(name = "accessory", table = "sys_generator", pkColumnName = "key_name", pkColumnValue = "Acc_ID", valueColumnName = "key_value", initialValue = 1, allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "accessory")
        
        private int accId;
        
        /**
         * 附件名称
         */
        private String accName;
        
        /**
         * 附件类型 img; office; media;other
         */
        @Column(length=10)
        private String accType;
        
        /**
         * 保存地址
         */
        @Column(length=150)
        private String savePath;
        
        /**
         * 文件后缀名
         */
        private String accSuffix;
        
        
        @ManyToOne
        @JoinColumn(name="ARTID")
        private Article article;

    public int getAccId() {
        return accId;
    }

    public void setAccId(int accId) {
        this.accId = accId;
    }

    public String getAccName() {
        return accName;
    }

    public void setAccName(String accName) {
        this.accName = accName;
    }

    public String getAccType() {
        return accType;
    }

    public void setAccType(String accType) {
        this.accType = accType;
    }

    public String getSavePath() {
        return savePath;
    }

    public void setSavePath(String savePath) {
        this.savePath = savePath;
    }

    public String getAccSuffix() {
        return accSuffix;
    }

    public void setAccSuffix(String accSuffix) {
        this.accSuffix = accSuffix;
    }

    public Article getArticle() {
        return article;
    }

    public void setArticle(Article article) {
        this.article = article;
    }
        
        
        
    
}
